Quadratic Bézier

The quadratic Bézier curve is just another quadratic equation and all quadratic equations are parabolas. If it doesn't graph to look like a parabola, then it is because the Bézier is being chopped off and represents only some small segment of the parabola. What we will do in this section is to use the Bézier parametrization to parametrize a specific parabola that has been given as a Cartesian equation. The general procedure is as follows.

  1. Select two points, $P_{0}$ and $P_{2}$ that are on the parabola. It is OK and perhaps even best if they are on the same side. If they are on opposite sides, then the derivative used to get the slope may change signs since there will be a root in the derivative.
  2. Solve the parabola equation for $y$.
  3. Take the derivative, $\frac{dy}{dx}$ of the result in step 2. There will be a $\pm$root and we will have to figure out which one of them to use as our slope.
  4. Write the tangent line equation at each of the two points.
  5. Solve for the intersection of the two lines in step 4. Call the intersection $P_{1}$.
  6. Write an equation like we did for string art.
$$(1-t)^{2}P_{0}+2(1-t)\cdot t\cdot P_{2}+t^{2}P_{1} \tag{0} \label{0}$$ It will be the parabola parametrization

Example: Suppose we are given a general form parabolic equation. $$8x^{2}+8xy+2y^{2}+3x-y=-7 \tag{1} \label{1}$$ Find a Bézier parametrization.
Bezier_6.png
Figure 1: The graph by parts of parabola $8x^{2}+8xy+2y^{2}+3x-y=-7$. This is what happens when we solve an equation which is technically a relation and not a function. This one resolves into two real functions. We have located two points on opposite portions of the parabola, but that was not necessary. The $x$ value of both points have a second solution that is on the alternate function.
Answer: For our point, $P_{0,}$ let $x=-3$, then $y\approx4.23443$. For the second point, let $x=-1.6$, then $y=4.2$. $$\begin{array}{c} P_{0}=(-3,4.23443)\\ P_{2}=(-1.6,4.2) \end{array}$$ We solve $\eqref{1}$ for $y$, noting that there are two solutions. $$y=\frac{-8\;x\pm\sqrt{-8\;x-11}\;\sqrt{5}+1}{4} \tag{2} \label{2}$$ So far, we have the picture in figure 1. We take one of the derivatives of $\eqref{2}$. This represents one of two possible slopes for a tangent line. $$\frac{dy}{dx}=\frac{1}{4}\;\left(-4\cdot\frac{\sqrt{5}}{\sqrt{-8\;x-11}}-8\right) \tag{3} \label{3}$$ The other derivative is $$\frac{dy}{dx}=\frac{1}{4}\;\left(4\cdot\frac{\sqrt{5}}{\sqrt{-8\;x-11}}-8\right) \tag{4} \label{4}$$ Plug in $x(P_{0})$ to $\eqref{4}$ and compute the slope, $m=-1.37983$. Plug in $x(P_{2})$ in $\eqref{3}$ and compute the slope, $m_{1}=-\frac{11}{3}$. Graph these to show that we have the correct slopes. These two points are on opposite branches of the parabola, therefore we need both equations and we could easily get them backwards. The lines are $$y-y(P_{0})=m\left(x-x(P_{0})\right)$$ $$y-y(P_{2})=m_{1}\left(x-x(P_{2})\right)$$ Solving for the line intersections we get $P_{1}=\left(-0.77033,1.15788\right)$. Finally, we just substitute all of these values into $\eqref{0}$ to get the parametrized parabola. $$L(t)=\left(\begin{array}{c} x\\ y \end{array}\right)=(1-t)^{2}P_{0}+2(1-t)\cdot t\cdot P_{1}+t^{2}P_{2}$$ $$\left(\begin{array}{c} x\\ y \end{array}\right)=(1-t)^{2}\left(\begin{array}{c} -3.0\\ 4.423443 \end{array}\right)+2(1-t)\cdot t\cdot\left(\begin{array}{c} -0.77033\\ 1.15788 \end{array}\right)+t^{2}\cdot\left(\begin{array}{c} -1.6\\ 4.2 \end{array}\right) \tag{5} \label{5}$$
Bezier_5.png
Figure 2: Example Parametrization. The original Cartesian equation (green) is $8x^{2}+8xy+2y^{2}+3x-y=-7$ and the parametrized equation (black) is given in $\eqref{5}$. If we confine $t$ such that $0\le t\le 1$ then the parabolic curve will only graph between point $P_{0}$ and $P_{2}$.

Vertex of a Bezier Parabola

The parametric parabola is written as $$\left(\begin{array}{c} x\\ y \end{array}\right)=(1-t)^{2}P_{0}+2(1-t)\cdot t\cdot P_{1}+t^{2}P_{2} \tag{6} \label{6}$$ and we can say that the vertex occurs when the magnitude of the derivative is minimized. Any non-colinear choices for the three points will yield a parabola. Let $$P_{0}=\left(\begin{array}{c} x_{0}\\ y_{0} \end{array}\right)\qquad P_{1}=\left(\begin{array}{c} x_{1}\\ y_{1} \end{array}\right)\qquad P_{2}=\left(\begin{array}{c} x_{2}\\ y_{2} \end{array}\right), \tag{7} \label{7}$$ and substitute these points into $\eqref{6}$, expand and take the vector derivatives (both top and bottom). Equation $\eqref{8}$ shows the substitution. $$\left(\begin{array}{c} x\\ y \end{array}\right)=(1-t)^{2}\left(\begin{array}{c} x_{0}\\ y_{0} \end{array}\right)+2(1-t)t\left(\begin{array}{c} x_{1}\\ y_{1} \end{array}\right)+t^{2}\left(\begin{array}{c} x_{2}\\ y_{2} \end{array}\right) \tag{8} \label{8}$$ Equation $\eqref{9}$ is the algebraic expansion into terms $$\left(\begin{array}{c} x\\ y \end{array}\right)=\left(\begin{array}{c} x_{0}\\ y_{0} \end{array}\right)t^{2}-2\left(\begin{array}{c} x_{0}\\ y_{0} \end{array}\right)t+\left(\begin{array}{c} x_{0}\\ y_{0} \end{array}\right)-2\left(\begin{array}{c} x_{1}\\ y_{1} \end{array}\right)t^{2}+2\left(\begin{array}{c} x_{1}\\ y_{1} \end{array}\right)t+t^{2}\left(\begin{array}{c} x_{2}\\ y_{2} \end{array}\right) \tag{9} \label{9}$$ Equation $\eqref{10}$ gets $(dx/dt,dy/dt)$ $$\left(\begin{array}{c} x'\\ y' \end{array}\right)=2t\left(\begin{array}{c} x_{0}\\ y_{0} \end{array}\right)-2\left(\begin{array}{c} x_{0}\\ y_{0} \end{array}\right)-4\left(\begin{array}{c} x_{1}\\ y_{1} \end{array}\right)t+2\left(\begin{array}{c} x_{1}\\ y_{1} \end{array}\right)+2\left(\begin{array}{c} x_{2}\\ y_{2} \end{array}\right)t \tag{10} \label{10}$$ Then collect terms. Notice that there is one term in $t$ and nearly all else are constants. $$\left(\begin{array}{c} x'\\ y' \end{array}\right)=2\left[\left(\begin{array}{c} x_{0}\\ y_{0} \end{array}\right)-2\left(\begin{array}{c} x_{1}\\ y_{1} \end{array}\right)+\left(\begin{array}{c} x_{2}\\ y_{2} \end{array}\right)\right]t+2\left[\left(\begin{array}{c} x_{1}\\ y_{1} \end{array}\right)-\left(\begin{array}{c} x_{0}\\ y_{0} \end{array}\right)\right] \tag{11} \label{11}$$ Equation $\eqref{11}$ is a linear vector equation and just happens to be tangent to our Bézier Curve at any point P(t).

We want to minimize the magnitude of the derivative, so we expect to get something like $$\left(x^{\prime}\right)^{2}+\left(y^{\prime}\right)^{2}=at^{2}+bt+c \tag{12} \label{12}$$ and we already know that the minimum of the parabola $at^{2}+bt+c$ is at the vertex and is given by $$t=-\frac{b}{2a} \tag{13} \label{13}$$ but squaring the top and bottom of $\eqref{11}$ gives a very large number of terms that then must be added together and factored to get $a$ and $b$. There is another way, which is to use a CAS and push in numeric values for the three points thereby getting the coefficients $a$ and $b$ to use in $\eqref{13}$. Also, if you expend the effort to square and add $\eqref{11}$ symbolically, and then you carefully re-assemble the points that we substituted in $\eqref{7}$, you can get the following expression. Note that the dot product causes this to condense to a single value for $t$. $$t=\frac{(P_{0}-P_{1})\cdot(P_{0}+P_{2}-2P_{1})}{(P_{0}+P_{2})\cdot(P_{0}+P_{2})-4P_{1}\cdot(P_{0}+P_{2}-P_{1})}$$ Take this $t$ value and put it into the parametric equation $\eqref{6}$ and the vertex will magically appear. If we do it for the example in figure 2 we get $t=0.54801$ which is used in $\eqref{6}$ to give a vertex, $V=(-1.475,\,2.7)$.

A numeric example of this procedure was given in the section Vertex of a Parametric Parabola.